import request from "@/utils/request";
//  查询问卷列表
export function getQuestionlist(query) {
  return request({
    url: "/manager/survey/list",
    method: "get",
    params: query,
  });
}
// 新增问卷
export function addQuestion() {
  return request({
    url: "/manager/survey/add/survey",
    method: "post"
  });
}
// 删除问卷
export function delQuestion(id) {
  return request({
    url: `/manager/survey/remove/survey/${id}`,
    method: "delete"
  });
}
// 发放/停止问卷
export function changeQuestion(query) {
  return request({
    url: "/manager/survey/modify/surveyStatus",
    method: "put",
    params: query,
  });
}
// 复制问卷
export function copyQuestion(query) {
  return request({
    url: "/manager/survey/copy/survey",
    method: "get",
    params: query,
  });
}
// 删除问卷所有回答
export function delAnswer(id) {
  return request({
    url: `/manager/survey/remove/answer/bySurveyId/${id}`,
    method: "delete",
  });
}
// 问卷统计
export function statistQuestion(query) {
  return request({
    url: "/manager/survey/surveyStatistics",
    method: "get",
    params: query,
  });
}
// 获取学校所有学员列表
export function getStudents() {
  return request({
    url: "/teacher/homePageCourse/allStudentList",
    method: "get",
  });
}
// 获取当前问卷已经发放过的用户
export function getacceptUser(query) {
  return request({
    url: "/manager/survey/surveyObtainedUsers",
    method: "get",
    params: query,
  });
}